<template>
  <div>
    <el-dialog
      title="修改点位"
      width="80%"
      :visible.sync="visible"
    >
      <el-form ref="form" label-width="80px" :model="form" :rules="rules">
        <el-form-item label="点位名称" prop="name">
          <el-input
            v-model="form.name"
            type="text"
            placeholder="请输入内容"
            maxlength="10"
            show-word-limit
          />
        </el-form-item>
        <el-form-item label="所在区域" label-width="80px" prop="region">
          <el-select v-model="form.region" placeholder="请选择">
            <el-option v-for="item in arr1" :key="item.id" :label="item.name" :value="item.id" />
          </el-select>
        </el-form-item>
        <el-form-item label="所属商圈" prop="businessType">
          <el-select v-model="form.businessType" placeholder="请选择">
            <el-option v-for="item in arr" :key="item.id" :label="item.name" :value="item.id" />
          </el-select>
        </el-form-item>
        <el-form-item label="合作商" prop="ownerName">
          <el-select v-model="form.ownerName" placeholder="请选择">
            <el-option v-for="item in arr2" :key="item.id" :label="item.name" :value="item.id" />
          </el-select>
        </el-form-item>
        <el-form-item ref="addrone" label="详细地址" prop="addr">
          <el-cascader
            v-model="form.addr"
            @change="handleChange"
          />
        </el-form-item>
        <el-form-item label="详细地址">
          <el-input
            v-model="form.addr"
            type="textarea"
            placeholder="请输入内容"
            maxlength="60"
            show-word-limit
          />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="visible=false">取 消</el-button>
        <el-button type="primary">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { editNodeList } from '@/api/point'
export default {
  name: 'DikedeEdit',

  data() {
    return {
      visible: false,
      form: {},
      rules: {
        name: [{ required: true, message: '必填', trigger: 'blur' }],
        region: [{ required: true, message: '必填', trigger: 'blur' }],
        businessType: [{ required: true, message: '必填', trigger: 'blur' }],
        ownerName: [{ required: true, message: '必填', trigger: 'blur' }]
      }

    }
  },

  mounted() {
    // this.editNodeList()
  },

  methods: {
    async editNodeList() {
      const res = editNodeList()
      console.log(res)
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
